package org.cuit.epoch.seon.combat.states;

import org.cuit.epoch.seon.combat.OrderContext;

// 待支付状态
public class PendingState implements OrderState {
    @Override
    public void pay(OrderContext context) {
        System.out.println("订单已支付。");
        context.setState(new PaidState());  // 转换到已支付状态
    }

    @Override
    public void cancel(OrderContext context) {
        System.out.println("订单已取消。");
        context.setState(new CancelledState());  // 转换到已取消状态
    }

    @Override
    public void ship(OrderContext context) {
        System.out.println("订单未支付，无法发货。");
    }
}